package cn.china.xfood.service;

import entity.Userorder;

import mapper.UserorderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserorderService implements UserorderMapper {
    @Autowired
    UserorderMapper userorderMapper;

    @Override
    public int deleteByPrimaryKey(String orderNumber) {
        return userorderMapper.deleteByPrimaryKey(orderNumber);
    }

    @Override
    public int insert(Userorder record) {
        return userorderMapper.insert(record);
    }

    @Override
    public int insertSelective(Userorder record) {
        return userorderMapper.insertSelective(record);
    }

    @Override
    public Userorder selectByPrimaryKey(String orderNumber) {
        return userorderMapper.selectByPrimaryKey(orderNumber);
    }

    @Override
    public int updateByPrimaryKeySelective(Userorder record) {
        return userorderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Userorder> getUserOrder(String username,int currentPage, int pageCount ) {
        return userorderMapper.getUserOrder(username,currentPage,pageCount);    }

    @Override
    public int getOrderCount(String username) {
        return userorderMapper.getOrderCount(username);
    }

    @Override
    public List<Userorder> getAllOrder(int currentPage, int pageCount) {
        return userorderMapper.getAllOrder(currentPage,pageCount);
    }

    @Override
    public int getAllOrderCount() {
        return userorderMapper.getAllOrderCount();
    }


    @Override
    public int updateByPrimaryKey(Userorder record) {
        return userorderMapper.updateByPrimaryKey(record);
    }
}
